<%@page import="org.teacup.eightdays.model.*" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
<%@ include file="/commons/taglibs.jsp" %>
<%@ include file="/base.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title><%=Manager.TABLE_ALIAS%> 维护</title>
<link rel="stylesheet" href="<c:url value="/resources/css/reset.css"/>" type="text/css"
	media="screen" />
<link rel="stylesheet" href="<c:url value="/resources/css/style.css"/>" type="text/css"
	media="screen" />
<link rel="stylesheet" href="<c:url value="/resources/css/invalid.css"/>" type="text/css" media="screen" />
<script type="text/javascript" src="<c:url value="/resources/scripts/jquery-1.3.2.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="/resources/scripts/simpla.jquery.configuration.js"/>"></script>
<script type="text/javascript" src="<c:url value="/resources/scripts/facebox.js"/>"></script>
<script type="text/javascript" src="<c:url value="/resources/scripts/jquery.wysiwyg.js"/>"></script>
<script type="text/javascript" src="<c:url value="/resources/scripts/jquery.datePicker.js"/>"></script>
<script type="text/javascript" src="<c:url value="/resources/scripts/jquery.date.js"/>"></script>
<script type="text/javascript" src="<c:url value="/widgets/simpletable/simpletable.js"/>"></script>
<script type="text/javascript" >
$(document).ready(function() {
	// 分页需要依赖的初始化动作
	window.simpleTable = new SimpleTable('queryForm',${page.thisPageNumber},${page.pageSize},'${pageRequest.sortColumns}');
	setTimeout(function(){$("#searchbox").click();},500);
});
</script>
</head>
<body style="background:none;">
	<form id="queryForm" name="queryForm" action="<c:url value="/Manager/list.shtml"/>" method="get" style="display: inline;">
	<div class="content-box">
		<!-- Start Content Box -->
		<div class="content-box-header">
			<h3 id = "searchbox">搜索</h3>
			<div class="clear"></div>
		</div>
		<div class="content-box-content">
			<div class="tab-content default-tab" id="tab1">
				<p class="queryparam">
					<label><%=Manager.ALIAS_LOGINNAME%></label>
					<input class="text-input large-input" value="${query.loginname}" id="loginname" name="loginname" maxlength="255"  class=""/>
					<br />
					<small>A small description of the field</small> 
				</p>
				<p class="queryparam">
					<label><%=Manager.ALIAS_LOGINPASSWORD%></label>
					<input class="text-input large-input" value="${query.loginpassword}" id="loginpassword" name="loginpassword" maxlength="255"  class=""/>
					<br />
					<small>A small description of the field</small> 
				</p>
				<p class="queryparam">
					<label><%=Manager.ALIAS_STATUS%></label>
					<input class="text-input large-input" value="${query.status}" id="status" name="status" maxlength="10"  class="validate-integer max-value-2147483647"/>
					<br />
					<small>A small description of the field</small> 
				</p>
				<div class="clear"></div>
			</div>
		</div>
	</div>
	<p>
		<a class="button" href="javascript:;" onclick="document.forms[0].submit();">查询</a>
		<a class="button" href="${ctx}/Manager/create.shtml">新增</a>
		<a class="button" href="javascript:batchDelete('${ctx}/Manager/delete.shtml','items',document.forms.queryForm)">删除</a>
	</p>
	<div class="content-box">
		<!-- Start Content Box -->
		<div class="content-box-header">
			<h3><%=Manager.TABLE_ALIAS%>信息</h3>
			<div class="clear"></div>
		</div>
		<!-- End .content-box-header -->
		<div class="content-box-content">
			<div class="tab-content default-tab" id="tab1">
				<!-- This is the target div. id must match the href of this div's tab -->
				<%@ include file="/commons/messages.jsp" %>
				<table>
					<thead>
						<tr>
							<th><input class="check-all" type="checkbox" /></th>
							<th sortColumn="loginname" ><%=Manager.ALIAS_LOGINNAME%></th>
							<th sortColumn="loginpassword" ><%=Manager.ALIAS_LOGINPASSWORD%></th>
							<th sortColumn="status" ><%=Manager.ALIAS_STATUS%></th>
						</tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="6">
								<div class="pagination">
									<simpletable:pageToolbar page="${page}">
									</simpletable:pageToolbar>
								</div>
								<!-- <div class="pagination">
									<a href="#" class="number"
										title="2">2</a> <a href="#" class="number current" title="3">3</a>
									<a href="#" class="number" title="4">4</a> 
									<a href="#"
										title="Last Page">Last &raquo;</a>
								</div> --> 
								<div class="clear"></div>
							</td>
						</tr>
					</tfoot>
					<tbody>
					<c:forEach items="${page.result}" var="item" varStatus="status">
					<tr>
						<td><input type="checkbox" name="items" value="managerId=${item.managerId}&" /></td>
						<td><c:out value='${item.loginname}'/>&nbsp;</td>
						<td><c:out value='${item.loginpassword}'/>&nbsp;</td>
						<td><c:out value='${item.status}'/>&nbsp;</td>
						<td>
						<a href="${ctx}/Manager/show.shtml?managerId=${item.managerId}&" title="查看"><img src="resources/images/icons/hammer_screwdriver.png" alt="查看" /></a>&nbsp;
							<a href="${ctx}/Manager/edit.shtml?managerId=${item.managerId}&" title="修改"><img src="resources/images/icons/pencil.png" alt="修改" /></a>&nbsp; 
							<a href="javascript:deleterow('${ctx}/Manager/delete.shtml','${item.managerId}',document.forms.queryForm)" title="删除"><img src="resources/images/icons/cross.png" alt="删除" /></a>
						</td>
					  </tr>
				  	  </c:forEach>
					</tbody>
				</table>
				<input type="hidden" name="itemid"/>
			</div>
		</div>
		<!-- End .content-box-content -->
	</div>
	</form>
</body>
</html>
</html>
